

#import <UIKit/UIKit.h>

/// 每个节点类型
@interface LZZTreeNode : NSObject

/// 父节点，nil表示该节点为根节点
@property (nonatomic , weak) id _Nullable parentObj;

@property (nonatomic , weak) id _Nullable nodeObj;

@property (nonatomic , copy, nonnull) NSString *name;

@property (nonatomic , copy, nullable) NSString *detail;

@property (nonatomic , assign) int depth;

/// 该节点是否处于展开状态
@property (nonatomic , assign) BOOL expand;

@property (nonatomic , strong, nullable) UIColor *color;


/// 快速实例化该对象模型
+ (instancetype _Nonnull)nodeWithParentObj:(id _Nullable)parentObj
                          nodeObj:(id _Nullable)nodeObj
                             name:(NSString *_Nonnull)name
                           detail:(NSString *_Nullable)detail
                            depth:(int)depth
                           expand:(BOOL)expand;

@end
